import { createRouter, createWebHistory } from "vue-router";

export default createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: "/",
            redirect: "/cookbook",
        },
        {
            path: "/cookbook",
            name: "cookbook",
            component: () => import("@/views/cookbook/Cookbook.vue"),
            meta: {
                title: "菜谱大全",
            },
        },
        {
            path: "/category",
            name: "category",
            component: () => import("@/views/category/Category.vue"),
            meta: {
                title: "分类",
            },
        },
        {
            path: "/more",
            name: "more",
            component: () => import("@/views/more/More.vue"),
            meta: {
                title: "更多",
            },
        },
    ],
});